<template>
	<view class="">
		<lee-linkage v-if="show == 1" :list="dataList" @onGoodItem="onGoodItem"></lee-linkage>
		<!-- <lee-linkage v-if="show == 2" :list="dataList" @onGoodItem="onGoodItem">
			<template v-slot:custom="{row}">
				<view>自定义插槽内容</view>
				<view class="" v-for="(item,index) in row.foods" :key="index">
					{{item.name}}
				</view>
			</template>
		</lee-linkage> -->
		<shopro-tabbar></shopro-tabbar>
	</view>
</template>

<script>
	  import leeLinkage from '@/components/StarLee-linkage/linkage.vue'
	export default {
		 components: {
		            leeLinkage
		        },
		data() {
			return {
			show: 1,//1默认，2自定义插槽
			dataList: [
				// {
				// 	"name": "素菜",
				// 	"foods": [{
				// 			"cat": 1,
				// 			"name": "炒青菜",
				// 			"icon": "https://img0.baidu.com/it/u=3055692262,3157455076&fm=253&fmt=auto&app=138&f=JPEG?w=658&h=449",
				// 			"key": "炒青菜"
				// 		},
				// 	]
				// },
				]
			}
		},
		onLoad() {
			this.getList();
		},
		methods: {
			onGoodItem(item){
				console.log(item);
				uni.navigateTo({
					url:item.url
				})
				// uni.showToast({
				// 	title:`点击了 ${item.name}`,
				// 	icon:'none'
				// })
			},
			getList(){
				var _this = this;
				_this.$http('apply.fuwu_center',{}).then(res=>{
					_this.dataList = res.data
				})
			}
			
		},
	}
</script>

<style>
	.body_gbc {
		background-color: #fff;
		height: 80%;
		display: flex;
		/* padding: 0 20rpx 0 0rpx; */
		height: 86vh;
	}

	.body_left {
		width: 20%;
		background-color: #f1f1f1;
		/* display: flex; */
		/* flex-direction: column; */
	}

	.body_left text {
		overflow: hidden;
		text-overflow: ellipsis;
		lines: 1;
		white-space: nowrap;
		height: 80rpx;
		line-height: 80rpx;
		padding: 0 10rpx;
	}

	.click_ {
		background-color: #fff;
		color: red;
	}


	.body_right {
		width: 75%;
		background-color: #fff;
		padding: 0rpx 20rpx;
	}

	.right {
		margin: 0rpx 0 20rpx 0;
		display: flex;
		flex-direction: column;
		width: 100%;
		border-radius: 10rpx;
		height: 3000rpx;
	}

	.right_box {
		margin: 10rpx 0;
		background-color: #fff;
	}


	.box_bd {
		display: flex;
		flex-wrap: wrap;
		text-align: center;
		margin: 0 20rpx;
		/* justify-content: space-around; */
	}

	.one {
		margin: 10rpx 37rpx;
	}
</style>